package cn.sskxyz.mongodb.locks;

import java.util.concurrent.TimeUnit;

public interface DistributedLock {

    String acquire(String key, long expiration, TimeUnit timeUnit);

    boolean release(String key, String token);

    boolean refresh(String key, String token, long expiration, TimeUnit timeUnit);
}